﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
                    xmlns:system="clr-namespace:System;assembly=mscorlib"
                    xmlns:wlcontrols="clr-namespace:Microsoft.Telco.Controls.WindowsLive">

    <!-- Assets -->
    <SolidColorBrush x:Key="PanelBrush"
                     Color="#FFF1F6FA" />

    <!-- Common styles -->
    <!-- End common styles-->

    <!-- Windows Live Presence Control-->
    <Style TargetType="wlcontrols:WLPresenceControl">
        <Setter Property="FontFamily"
                Value="Portable User Interface" />
        <Setter Property="Foreground"
                Value="#FF336699" />
        <Setter Property="FontWeight"
                Value="Normal" />
        <Setter Property="FontSize"
                Value="10" />
        <Setter Property="StatusIconHeight"
                Value="10" />
        <Setter Property="StatusIconWidth"
                Value="10" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="wlcontrols:WLPresenceControl">
                    <Grid Height="{TemplateBinding Height}"
                          Width="{TemplateBinding Height}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Button x:Name="StatusIconButton"
                                Grid.Column="0"
                                Width="{TemplateBinding StatusIconWidth}"
                                Height="{TemplateBinding StatusIconHeight}"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Left" Visibility="Collapsed"></Button>
                        <TextBlock x:Name="UserNameOrEmailTextBlock"
                                   VerticalAlignment="Center"
                                   Grid.Column="1"
                                   HorizontalAlignment="Left"
                                   FontFamily="{TemplateBinding FontFamily}"
                                   Foreground="{TemplateBinding Foreground}"
                                   FontWeight="{TemplateBinding FontWeight}"
                                   FontSize="{TemplateBinding FontSize}"
                                   Margin="3,0,0,0"></TextBlock>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="wlcontrols:WLContactsControl">
        <!--<Setter Property="CategoryFontFamily"
                Value="Portable User Interface" />
        <Setter Property="CategoryForeground"
                Value="#FF336699" />
        <Setter Property="CategoryFontWeight"
                Value="Bold" />
        <Setter Property="CategoryFontSize"
                Value="12" />
        <Setter Property="CategoryMargin"
                Value="0"></Setter>
        <Setter Property="ContactFontFamily"
                Value="Portable User Interface" />
        <Setter Property="ContactForeground"
                Value="Black" />
        <Setter Property="ContactFontWeight"
                Value="Normal" />
        <Setter Property="ContactFontSize"
                Value="10" />
        <Setter Property="ContactMargin"
                Value="0,5,0,5"></Setter>-->
        <Setter Property="MinHeight" Value="70"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="wlcontrols:WLContactsControl">
                    <ScrollViewer x:Name="MainScrollViewer">
                        <StackPanel>
                        <ItemsControl x:Name="ContactsList">
                            <ItemsControl.ItemTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Vertical">
                                        <TextBlock x:Name="CategoryNameTextblock"
                                               Text="{Binding CategoryName}"
                                               Margin="0"
                                               FontFamily="Portable User Interface"
                                               Foreground="Black"
                                               FontWeight="Bold"
                                               FontSize="12"/>
                                        <ItemsControl x:Name="ContactsForCategoryList"
                                                  ItemsSource="{Binding CategoryContacts}">
                                            <ItemsControl.ItemTemplate>
                                                <DataTemplate>
                                                    <wlcontrols:WLPresenceControl UserNameOrEmail="{Binding DisplayText}"
                                                                              UserStatus="{Binding PresenceStatus}"
                                                                              Margin="5,0,0,1" 
                                                                              FontFamily="Portable User Interface"
                                                                              Foreground="Black"
                                                                              FontWeight="Normal"
                                                                              FontSize="10"/>
                                                </DataTemplate>
                                            </ItemsControl.ItemTemplate>
                                        </ItemsControl>
                                    </StackPanel>
                                </DataTemplate>
                            </ItemsControl.ItemTemplate>
                        </ItemsControl>
                         <!--<TextBlock Height="10"></TextBlock>-->
                        </StackPanel>
                    </ScrollViewer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Windows Live User Profile control. This controls is descoped and will not be used -->
    <!--<Style TargetType="wlcontrols:WLProfileControl">
        <Setter Property="AvatarContainerBorderBrush"
                Value="#FF0A8036" />
        <Setter Property="AvatarContainerBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1"
                                     StartPoint="0.5,0">
                    <GradientStop Color="#FF5A9C00"
                                  Offset="0.498" />
                    <GradientStop Color="#FF339900" />
                    <GradientStop Color="#FF73C300"
                                  Offset="0.467" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="AvatarContainerBorderThickness"
                Value="1" />
        <Setter Property="AvatarWidth"
                Value="40" />
        <Setter Property="AvatarHeight"
                Value="40" />
        <Setter Property="AvatarMargin"
                Value="4" />
        <Setter Property="UserNameFontFamily"
                Value="Portable User Interface" />
        <Setter Property="UserNameForeground"
                Value="#FF336699" />
        <Setter Property="UserNameFontWeight"
                Value="Bold" />
        <Setter Property="UserNameFontSize"
                Value="12" />
        <Setter Property="UserStatusFontFamily"
                Value="Portable User Interface" />
        <Setter Property="UserStatusForeground"
                Value="#FF666666" />
        <Setter Property="UserStatusFontWeight"
                Value="Normal" />
        <Setter Property="UserStatusFontSize"
                Value="9" />
        <Setter Property="UserNameContainerMargin"
                Value="10,0,10,0" />
        <Setter Property="UserStatusListContainerBorderBrush"
                Value="#FFB0AFAF" />
        <Setter Property="UserStatusListContainerBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1"
                                     StartPoint="0.5,0">
                    <GradientStop Color="#FFE9E9E9"
                                  Offset="1" />
                    <GradientStop Color="#FFE9E9E9" />
                    <GradientStop Color="#FFF7F7F7"
                                  Offset="0.083" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="UserStatusListContainerBorderThickness"
                Value="1" />
        <Setter Property="UserStatusListContainerPadding"
                Value="5" />
        <Setter Property="UserStatusListContainerWidth"
                Value="160" />
        <Setter Property="StatusListItemFontFamily"
                Value="Portable User Interface" />
        <Setter Property="StatusListItemForeground"
                Value="#FF336699" />
        <Setter Property="StatusListItemFontWeight"
                Value="Normal" />
        <Setter Property="StatusListItemFontSize"
                Value="9" />
        <Setter Property="AvailableStatusText"
                Value="Available"></Setter>
        <Setter Property="BusyStatusText"
                Value="Busy"></Setter>
        <Setter Property="AwayStatusText"
                Value="Away"></Setter>
        <Setter Property="OfflineStatusText"
                Value="Appear offline"></Setter>
        <Setter Property="SignoutText"
                Value="Sign out"></Setter>

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="wlcontrols:WLProfileControl">
                    <Grid x:Name="WLProfileLayoutRoot">
                        <StackPanel Orientation="Horizontal">
                            <Border x:Name="AvatarContainerBorder"
                                    Grid.Column="0"
                                    BorderThickness="{TemplateBinding AvatarContainerBorderThickness}"
                                    BorderBrush="{TemplateBinding AvatarContainerBorderBrush}"
                                    Background="{TemplateBinding AvatarContainerBrush}">
                                <Image x:Name="AvatarImage"
                                       Height="{TemplateBinding AvatarHeight}"
                                       Width="{TemplateBinding AvatarWidth}"
                                       Margin="{TemplateBinding AvatarMargin}"
                                       HorizontalAlignment="Stretch"
                                       VerticalAlignment="Stretch"
                                       Source="Assets\thumbnail.jpg"></Image>
                            </Border>

                            <StackPanel Orientation="Vertical" x:Name="UserNameContainerPanel"
                                        Margin="{TemplateBinding UserNameContainerMargin}">
                                <TextBlock x:Name="UserNameTextBlock"
                                           TextWrapping="Wrap"
                                           FontFamily="{TemplateBinding UserNameFontFamily}"
                                           FontWeight="{TemplateBinding UserNameFontWeight}"
                                           FontSize="{TemplateBinding UserNameFontSize}"
                                           Foreground="{TemplateBinding UserNameForeground}" />
                                <TextBlock x:Name="UserStatusTextBlock"
                                           FontFamily="{TemplateBinding UserStatusFontFamily}"
                                           FontWeight="{TemplateBinding UserStatusFontWeight}"
                                           FontSize="{TemplateBinding UserStatusFontSize}"
                                           Foreground="{TemplateBinding UserStatusForeground}" />
                                <TextBlock x:Name="UserStatusTextBox" Visibility="Collapsed"
                                           FontFamily="{TemplateBinding UserStatusFontFamily}"
                                           FontWeight="{TemplateBinding UserStatusFontWeight}"
                                           FontSize="{TemplateBinding UserStatusFontSize}"
                                           Foreground="{TemplateBinding UserStatusForeground}" />
                            </StackPanel>

                            <Border x:Name="DropDownIconContainerBorder"
                                    Padding="5">
                                <Path Data="M0.5,0.5 L12.5,0.5 L6.2291665,6.7291665 L0.5,12.5 z"
                                      HorizontalAlignment="Center"
                                      VerticalAlignment="Top"
                                      Height="5"
                                      Stretch="Fill"
                                      Width="5"
                                      UseLayoutRounding="False"
                                      RenderTransformOrigin="0.5,0.5">
                                    <Path.RenderTransform>
                                        <CompositeTransform Rotation="-135" />
                                    </Path.RenderTransform>
                                    <Path.Fill>
                                        <LinearGradientBrush EndPoint="0.854,0.854"
                                                             StartPoint="0.146,0.146">
                                            <GradientStop Color="#FF525252"
                                                          Offset="1" />
                                            <GradientStop Color="#FF676565" />
                                        </LinearGradientBrush>
                                    </Path.Fill>
                                </Path>
                            </Border>

                            <Popup x:Name="UserStatusPickerPopup">
                                <Border x:Name="UserStatusListBorder"
                                        Width="{TemplateBinding UserStatusListContainerWidth}"
                                        Padding="{TemplateBinding UserStatusListContainerPadding}"
                                        BorderThickness="{TemplateBinding UserStatusListContainerBorderThickness}"
                                        BorderBrush="{TemplateBinding UserStatusListContainerBorderBrush}"
                                        Background="{TemplateBinding UserStatusListContainerBrush}">
                                    <StackPanel x:Name="UserStatusesList"
                                                Orientation="Vertical">
                                        <StackPanel Orientation="Horizontal"
                                                    x:Name="AvailableStatusPanel">
                                            <TextBlock x:Name="AvailableStatusTextBlock"
                                                       Text="{TemplateBinding AvailableStatusText}"
                                                       FontFamily="{TemplateBinding StatusListItemFontFamily}"
                                                       FontWeight="{TemplateBinding StatusListItemFontWeight}"
                                                       FontSize="{TemplateBinding StatusListItemFontSize}"
                                                       Foreground="{TemplateBinding StatusListItemForeground}" />
                                            <Grid x:Name="AvailableIcon"
                                                  HorizontalAlignment="Left"
                                                  Margin="0,2,0,3"
                                                  Width="10">
                                                <Ellipse Width="10"
                                                         Height="10">
                                                    <Ellipse.Fill>
                                                        <RadialGradientBrush>
                                                            <GradientStop Color="#FF239600"
                                                                          Offset="1" />
                                                            <GradientStop Color="#FF3DCD12" />
                                                        </RadialGradientBrush>
                                                    </Ellipse.Fill>
                                                </Ellipse>
                                                <Path Data="M6.5,7.1054274E-15 C8.0705595,-8.1549352E-08 9.5110197,0.55702066 10.634604,1.4842838 L10.772064,1.6033556 L10.55907,1.7302628 C7.5776463,3.5327053 4.0704994,6.3150578 1.4756117,10.390263 L1.3947756,10.520702 L1.2913197,10.389053 C0.48028833,9.3045759 4.8762402E-08,7.9583769 0,6.5 C4.8762402E-08,2.9101491 2.9101491,-8.1549352E-08 6.5,7.1054274E-15 z"
                                                      Margin="1,1,3.228,3.479"
                                                      Stretch="Fill"
                                                      UseLayoutRounding="False"
                                                      Width="5"
                                                      Height="5">
                                                    <Path.Fill>
                                                        <LinearGradientBrush EndPoint="0.5,1"
                                                                             MappingMode="RelativeToBoundingBox"
                                                                             StartPoint="0.5,0">
                                                            <GradientStop Color="White" />
                                                            <GradientStop Color="White" />
                                                            <GradientStop Color="Transparent"
                                                                          Offset="1" />
                                                        </LinearGradientBrush>
                                                    </Path.Fill>
                                                </Path>
                                            </Grid>
                                        </StackPanel>
                                        <StackPanel Orientation="Horizontal"
                                                    x:Name="BusyStatusPanel">
                                            <TextBlock x:Name="BusyStatusTextBlock"
                                                       Text="{TemplateBinding BusyStatusText}"
                                                       FontFamily="{TemplateBinding StatusListItemFontFamily}"
                                                       FontWeight="{TemplateBinding StatusListItemFontWeight}"
                                                       FontSize="{TemplateBinding StatusListItemFontSize}"
                                                       Foreground="{TemplateBinding StatusListItemForeground}" />
                                            <Grid x:Name="BusyIcon"
                                                  HorizontalAlignment="Left"
                                                  Margin="0,2,0,3"
                                                  Width="10">
                                                <Ellipse Width="10"
                                                         Height="10">
                                                    <Ellipse.Fill>
                                                        <RadialGradientBrush>
                                                            <GradientStop Color="#FF963600"
                                                                          Offset="1" />
                                                            <GradientStop Color="#FFEF653C" />
                                                        </RadialGradientBrush>
                                                    </Ellipse.Fill>
                                                </Ellipse>
                                                <Path Data="M6.5,7.1054274E-15 C8.0705595,-8.1549352E-08 9.5110197,0.55702066 10.634604,1.4842838 L10.772064,1.6033556 L10.55907,1.7302628 C7.5776463,3.5327053 4.0704994,6.3150578 1.4756117,10.390263 L1.3947756,10.520702 L1.2913197,10.389053 C0.48028833,9.3045759 4.8762402E-08,7.9583769 0,6.5 C4.8762402E-08,2.9101491 2.9101491,-8.1549352E-08 6.5,7.1054274E-15 z"
                                                      Margin="1,1,3.228,3.479"
                                                      Stretch="Fill"
                                                      UseLayoutRounding="False"
                                                      Width="5"
                                                      Height="5">
                                                    <Path.Fill>
                                                        <LinearGradientBrush EndPoint="0.5,1"
                                                                             MappingMode="RelativeToBoundingBox"
                                                                             StartPoint="0.5,0">
                                                            <GradientStop Color="White" />
                                                            <GradientStop Color="White" />
                                                            <GradientStop Color="Transparent"
                                                                          Offset="1" />
                                                        </LinearGradientBrush>
                                                    </Path.Fill>
                                                </Path>
                                            </Grid>
                                        </StackPanel>
                                        <StackPanel Orientation="Horizontal"
                                                    x:Name="AwayStatusPanel">
                                            <TextBlock x:Name="AwayStatusTextBlock"
                                                       Text="{TemplateBinding AwayStatusText}"
                                                       FontFamily="{TemplateBinding StatusListItemFontFamily}"
                                                       FontWeight="{TemplateBinding StatusListItemFontWeight}"
                                                       FontSize="{TemplateBinding StatusListItemFontSize}"
                                                       Foreground="{TemplateBinding StatusListItemForeground}" />
                                            <Grid x:Name="AwayIcon"
                                                  HorizontalAlignment="Left"
                                                  Margin="0,2,0,3"
                                                  Width="10">
                                                <Ellipse Width="10"
                                                         Height="10">
                                                    <Ellipse.Fill>
                                                        <RadialGradientBrush>
                                                            <GradientStop Color="#FFD48F03"
                                                                          Offset="1" />
                                                            <GradientStop Color="#FFFFFA00" />
                                                        </RadialGradientBrush>
                                                    </Ellipse.Fill>
                                                </Ellipse>
                                                <Path Data="M6.5,7.1054274E-15 C8.0705595,-8.1549352E-08 9.5110197,0.55702066 10.634604,1.4842838 L10.772064,1.6033556 L10.55907,1.7302628 C7.5776463,3.5327053 4.0704994,6.3150578 1.4756117,10.390263 L1.3947756,10.520702 L1.2913197,10.389053 C0.48028833,9.3045759 4.8762402E-08,7.9583769 0,6.5 C4.8762402E-08,2.9101491 2.9101491,-8.1549352E-08 6.5,7.1054274E-15 z"
                                                      Margin="1,1,3.228,3.479"
                                                      Stretch="Fill"
                                                      UseLayoutRounding="False"
                                                      Width="5"
                                                      Height="5">
                                                    <Path.Fill>
                                                        <LinearGradientBrush EndPoint="0.5,1"
                                                                             MappingMode="RelativeToBoundingBox"
                                                                             StartPoint="0.5,0">
                                                            <GradientStop Color="White" />
                                                            <GradientStop Color="White" />
                                                            <GradientStop Color="Transparent"
                                                                          Offset="1" />
                                                        </LinearGradientBrush>
                                                    </Path.Fill>
                                                </Path>
                                            </Grid>
                                        </StackPanel>
                                        <StackPanel Orientation="Horizontal"
                                                    x:Name="OfflineStatusPanel">
                                            <TextBlock x:Name="OfflineStatusTextBlock"
                                                       Text="{TemplateBinding OfflineStatusText}"
                                                       FontFamily="{TemplateBinding StatusListItemFontFamily}"
                                                       FontWeight="{TemplateBinding StatusListItemFontWeight}"
                                                       FontSize="{TemplateBinding StatusListItemFontSize}"
                                                       Foreground="{TemplateBinding StatusListItemForeground}" />
                                            <Grid x:Name="OfflineIcon"
                                                  HorizontalAlignment="Left"
                                                  Margin="0,2,0,3"
                                                  Width="10">
                                                <Ellipse Width="10"
                                                         Height="10">
                                                    <Ellipse.Fill>
                                                        <RadialGradientBrush>
                                                            <GradientStop Color="#FF898888"
                                                                          Offset="1" />
                                                            <GradientStop Color="White" />
                                                        </RadialGradientBrush>
                                                    </Ellipse.Fill>
                                                </Ellipse>
                                                <Path Data="M6.5,7.1054274E-15 C8.0705595,-8.1549352E-08 9.5110197,0.55702066 10.634604,1.4842838 L10.772064,1.6033556 L10.55907,1.7302628 C7.5776463,3.5327053 4.0704994,6.3150578 1.4756117,10.390263 L1.3947756,10.520702 L1.2913197,10.389053 C0.48028833,9.3045759 4.8762402E-08,7.9583769 0,6.5 C4.8762402E-08,2.9101491 2.9101491,-8.1549352E-08 6.5,7.1054274E-15 z"
                                                      Margin="1,1,3.228,3.479"
                                                      Stretch="Fill"
                                                      UseLayoutRounding="False"
                                                      Width="5"
                                                      Height="5">
                                                    <Path.Fill>
                                                        <LinearGradientBrush EndPoint="0.5,1"
                                                                             MappingMode="RelativeToBoundingBox"
                                                                             StartPoint="0.5,0">
                                                            <GradientStop Color="White" />
                                                            <GradientStop Color="White" />
                                                            <GradientStop Color="Transparent"
                                                                          Offset="1" />
                                                        </LinearGradientBrush>
                                                    </Path.Fill>
                                                </Path>
                                            </Grid>
                                        </StackPanel>

                                        <Path Data="M0,-18.8125 L370.69965,-18.8125"
                                              Fill="#FFCCCCCC"
                                              Margin="10,0,0,30"
                                              Stretch="Fill"
                                              Stroke="#FFDFDFDF"
                                              Height="1"
                                              VerticalAlignment="Bottom"
                                              HorizontalAlignment="Stretch">
                                            <Path.Effect>
                                                <DropShadowEffect BlurRadius="0"
                                                                  ShadowDepth="1"
                                                                  Color="White" />
                                            </Path.Effect>
                                        </Path>

                                        <TextBlock x:Name="SignoutTextBlock"
                                                   Text="{TemplateBinding SignoutText}"
                                                   FontFamily="{TemplateBinding StatusListItemFontFamily}"
                                                   FontWeight="{TemplateBinding StatusListItemFontWeight}"
                                                   FontSize="{TemplateBinding StatusListItemFontSize}"
                                                   Foreground="{TemplateBinding StatusListItemForeground}" />
                                    </StackPanel>
                                </Border>
                            </Popup>
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>-->
</ResourceDictionary>